package com.cheer.job;

import com.cheer.dao.LotteryCacheDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author cheer
 */
@Component
@Slf4j
public class LotteryTrimJob {

    @Autowired
    private LotteryCacheDao lotteryCacheDao;

    @Scheduled(cron = "0 0 0/1 * * ?")
    public void scheduleLotteryTrim() {
        lotteryCacheDao.trimAnnouncement();
    }

}
